package cn.iocoder.yudao.module.wms.dal.mysql.inventory;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.wms.dal.dataobject.inventory.InventoryDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.wms.controller.admin.inventory.vo.*;

/**
 * 库存 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface InventoryMapper extends BaseMapperX<InventoryDO> {

    default PageResult<InventoryDO> selectPage(InventoryPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<InventoryDO>()
                // .eqIfPresent(InventoryDO::getCid, reqVO.getCid())
                // .eqIfPresent(InventoryDO::getCount, reqVO.getCount())
                // .eqIfPresent(InventoryDO::getLocation, reqVO.getLocation())
                // .likeIfPresent(InventoryDO::getName, reqVO.getName())
                .eqIfPresent(InventoryDO::getWid, reqVO.getWid())
                .orderByDesc(InventoryDO::getUpdateAt));
    }

}